package com.sky.mapper;

import com.sky.dto.OrdersDTO;
import com.sky.dto.OrdersPageQueryDTO;
import com.sky.entity.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface OrdersMapper {
    void saveOrder(Orders orders);

    Orders findOrderByNum(String orderNum);

    void update(Orders build);



    Orders findOrderById(Long id);


    List<Orders> findAll();




    /**
     * 多条件查询
     * @param ordersPageQueryDTO
     * @return
     */
    List<Orders> findByMultiple(OrdersPageQueryDTO ordersPageQueryDTO);


    List<Orders> getAllByOrders(Orders orders);

    List<Orders> findByStatusAndOrdertimeLT(@Param("status") Integer status, @Param("time") LocalDateTime time);}
